<template>
  <view class="container">
    <view class="hidden-title">停电申请信息</view>
    <view class="background-white">
      <view class="flex text bor-btm">
        作业票编号：<text>{{ detaiData.ticketCode }}</text>
      </view>
      <view class="flex text bor-btm">
        分厂：<text>{{ detaiData.areaName }}</text>
      </view>
      <view class="flex text bor-btm">
        工段/区域：<text>{{ detaiData.secondFactoryName }}</text>
      </view>
      <view class="flex text bor-btm">
        设备：<text>{{ detaiData.deviceName }}</text>
      </view>
      <view class="flex text bor-btm">
        工作内容：<text>{{ detaiData.content }}</text>
      </view>
      <view class="flex text bor-btm">
        电压：<text>{{ detaiData.electricNum + detaiData.electricUnit }}</text>
      </view>
      <view class="flex text bor-btm">
        停电申请：<text>{{ detaiData.stopApplyUserName }}</text>
      </view>
    </view>
    <view class="background-white bor-top" v-if="detaiData.stopUserName">
      <view class="flex text bor-btm" v-if="detaiData.stopConfirmTime">
        停电确认：<text>{{ detaiData.stopConfirmTime }}</text>
      </view>
      <view class="flex text bor-btm">
        停电人：<text>{{ detaiData.stopUserName }}</text>
      </view>
      <view class="flex text bor-btm" v-if="detaiData.stopRemark">
        停电备注：<text>{{ detaiData.stopRemark }}</text>
      </view>
    </view>
    <view class="background-white bor-top" v-if="detaiData.startApplyUserName">
      <view class="flex text bor-btm">
        送电时间：<text>{{ detaiData.startTime }}</text>
      </view>
      <view class="flex text bor-btm">
        送电申请：<text>{{ detaiData.startApplyUserName }}</text>
      </view>
    </view>
    <view class="background-white bor-top" v-if="detaiData.startUserName">
      <view class="flex text bor-btm" v-if="detaiData.startConfirmTime">
        送电确认：<text>{{ detaiData.startConfirmTime }}</text>
      </view>
      <view class="flex text bor-btm">
        送电人：<text>{{ detaiData.startUserName }}</text>
      </view>
      <view class="flex text bor-btm" v-if="detaiData.startRemark">
        送电备注：<text>{{ detaiData.startRemark }}</text>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    detaiData: {
      type: Object,
      default: () => ({}),
    },
  },

  data() {
    return {
      ticketId: '',
    };
  },
};
</script>

<style lang="scss" scoped>
.container {
  .background-white {
    background-color: #fff;
    padding: 20rpx 30rpx;
    box-sizing: border-box;

    .uni-forms-item__label {
      color: #333;
      font-size: 30rpx;
    }

    .bor-btm {
      display: flex;
      border-bottom: 1px solid #d5d7e3;
    }

    .photo {
      display: flex;
      justify-content: space-between;

      image {
        width: 214rpx;
        height: 214rpx;
      }
    }

    .text {
      padding-bottom: 20rpx;
      padding-top: 4rpx;
      color: #333;

      text {
        color: #666;
      }
    }
  }
}

.hidden-title {
  background: #f5f5f5;
  padding: 20rpx;
  color: #999;
}

.bor-top {
  border-top: 20rpx solid #f5f5f5;
}

.submit-group {
  background: #fff;
  z-index: 9;
  padding: 30px;
}

.u-button {
  width: 600rpx;
}
</style>
